﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebsiteComponent.DAL;
namespace WebsiteComponent.BLL
{
    public class Website:IWebsite
    {
        #region properties
        public WebsiteDAL websiteDAL;
        private int _website_id;

        public int Website_id
        {
            get { return _website_id; }
            set { _website_id = value; }
        }
        private string _ten;

        public string Ten
        {
            get { return _ten; }
            set { _ten = value; }
        }
        private string _url;

        public string Url
        {
            get { return _url; }
            set { _url = value; }
        }
        private string _path;

        public string Path
        {
            get { return _path; }
            set { _path = value; }
        }
        #endregion
        #region Method
        public Website()
        {
            websiteDAL = new WebsiteDAL();
        }
        public void Get()
        {
            websiteDAL.Get(this);
        }
        public int Add()
        {
            return websiteDAL.Add(this);
        }
        public void Delete()
        {
            websiteDAL.Delete(this);
        }
        public void Update()
        {
            websiteDAL.Update(this);
        }
        public List<Website> GetAll(int currentPage, int pageSize, out int total, string ten, string column_sort, string type_sort)
        {
            return websiteDAL.GetAll(currentPage, pageSize, out total, ten, column_sort, type_sort);
        }
        #endregion
    }
}
